function ActionButton() {

	this.buttonType = "";
    this.action = null;

    this.standardButton = true;
	this.mouseDownPoint = null;
}
ActionButton.prototype = new MessUIElement();

    /**
    * Builds button dom object and performs all necessary initialization routines.
    *
    * @private
    * @method  build
    * @param   {MessUIElement} parent button parent
    */
    ActionButton.prototype.build = function() {

		this.setTheme( this.parent.getTheme() );

        // initialize control
        this.initControl()

        // build dom
        this.buildDOMObject();

        // attach events
        this.attachEventHandlers();
    };

    /**
    * Builds DOM object.
    *
    * @private
    * @method  buildDOMObject
    */
    ActionButton.prototype.buildDOMObject = function() {

        // prepare dom representation
        this.domObject = DIV();
        this.domObject.id = this.id;
        this.domObject.className = this.cssPrefix + this.getTheme() + this.buttonType;

        // determine display type
        this.setButtonRepresentation();
    };

	/**
	 * Sets button representation
	 *
	 * @public
	 * @method  setButtonRepresentation
	 */
	ActionButton.prototype.setButtonRepresentation = function() {

		this.setButtonType("");
	};

    /**
    * Attaches all basic button event handlers
    *
    * @private
    * @method  attachEventHandlers
    */
    ActionButton.prototype.attachEventHandlers = function() {

        // mouseover
		eventUtil.addEventHandler(this.domObject, eventUtil.MOUSE_OVER, ActionButton.prototype.onMouseOverHandler);
         // mouseout
		eventUtil.addEventHandler(this.domObject, eventUtil.MOUSE_OUT, ActionButton.prototype.onMouseOutHandler);
        // mouseclick
        eventUtil.addEventHandler(this.domObject, eventUtil.MOUSE_CLICK, ActionButton.prototype.onMouseClickHandler);
    };

    /**
    * EVENT, onmouseover shrink button handler
    *
    * @private
    * @method  onMouseOverHandler
    */
    ActionButton.prototype.onMouseOverHandler = function() {

        var oEvent = eventUtil.getEvent();
		var oSource = eventUtil.getSource(oEvent);

        var button = ActionButton.prototype.objects.get(oSource.id);
            button.domObject.className = button.cssPrefix + button.getTheme() +  button.buttonType + "Over";
    };

    /**
    * EVENT, onmouseout shrink button handler
    *
    * @private
    * @method  onMouseOutHandler
    */
    ActionButton.prototype.onMouseOutHandler = function() {

        var oEvent = eventUtil.getEvent();
		var oSource = eventUtil.getSource(oEvent);

        var button = ActionButton.prototype.objects.get(oSource.id);
            button.domObject.className = button.cssPrefix + button.getTheme() + button.buttonType;
    };

    /**
    * EVENT, onmouseclick shrink button handler
    *
    * @private
    * @method  onMouseClickHandler
    */
    ActionButton.prototype.onMouseClickHandler = function() {

        var oEvent = eventUtil.getEvent();
		var oSource = eventUtil.getSource(oEvent);

        var button = ActionButton.prototype.objects.get(oSource.id);

        // run specified action on parent object
        var parentObject = button.getParent();
		eval("parentObject."+button.getAction()+"();");
    };

    /**
    * Set button type. Available types should bet {Top,Bottom,Left,Right}. Button type determines final
    * button css class.
    *
    * @public
    * @method  setButtonType
    * @param   {String} type   type string
    */
    ActionButton.prototype.setButtonType = function(type) {

        this.buttonType = type;
        try {
            this.domObject.className = this.cssPrefix + this.getTheme() + this.buttonType;
        } catch (ex) {}
    };

    /**
     * standardButton property getter
     *
     * @public
     * @method  isStandardButton
     * @return  {Boolean}
     */
    ActionButton.prototype.isStandardButton = function() {

    	return this.standardButton;
    };

    /**
     * standardButton property setter
     *
     * @public
     * @method  setStandardButton
     * @param   {Boolean} mode
     */
    ActionButton.prototype.setStandardButton = function(mode) {

    	this.standardButton = mode;
    };

    /**
     * Mousedown point property getter
     *
     * @public
     * @method  getMouseDownPoint
     * @return  {MessCoordinate}  mousedown point
     */
    ActionButton.prototype.getMouseDownPoint = function() {

    	return this.mouseDownPoint;
    };

    /**
     * Mousedown point property setter
     *
     * @public
     * @method  setMouseDownPoint
     * @param   {MessCoordinate} point
     */
	ActionButton.prototype.setMouseDownPoint = function(point) {

		this.mouseDmouseDownPoint = point;
	};

    /**
    * action property setter
    *
    * @public
    * @method  setAction
    * @param   {String} action  action to set
    */
    ActionButton.prototype.setAction = function(action) {

        this.action = action;
    };

    /**
    * action property getter
    *
    * @public
    * @method  getAction
    * @return  {String} action
    */
    ActionButton.prototype.getAction = function() {

        return this.action;
    };
